package trism.trifield.model.slots {
	import flash.display.Sprite;
	import com.samoiloff.util.data.ArrItemCloneDispatcher;

	/**
	 * @author Samoiloff  http://samoiloff.com/
	 */
	public class Slots extends ArrItemCloneDispatcher {
		
		private var _mc : Sprite;
		
		public function Slots() {
			super();
			_mc = new Sprite();
		}
		
		
		override public function addItem(item : Object) : void {
			var slot : Slot = item as Slot;
			_mc.addChild(slot.mc);
			super.addItem(item);
		}
		
		
		override public function removeItem(item : Object) : Object {
			var slot : Slot = item as Slot;
			_mc.removeChild(slot.mc);
			return super.removeItem(item);
		}
		
		
		public function getItemAt(i : int) : Slot {
			return _arr[i] as Slot;
		}

		public function get mc() : Sprite {
			return _mc;
		}
		
	}
}
